#delim cr
set more off
set varabbrev off
pause on
graph set ps logo off

capture log close
set linesize 200
set logtype text
log using ../log/graph-non-linear-effects.log , replace

/* --------------------------------------

Graph the point estimates...

--------------------------------------- */

clear all
estimates clear

************************************************************
**   Graph non-linear effects
************************************************************

clear all
input aqi	nonlinear_lb	nonlinear_b	nonlinear_ub	linear_lb	linear_b	linear_ub
75	-0.0231	-0.0027	0.0177	-0.03939	-0.022	-0.00411
125	-0.062208	-0.0283	0.005608	-0.06565	-0.036	-0.00685
175	-0.0809	-0.0486	-0.0163	-0.09191	-0.051	-0.00959
225	-0.142468	-0.0919	-0.041332	-0.11817	-0.065	-0.01233
end

list

local inv_golden_ratio = 2 / ( sqrt(5) + 1 )
graph set window fontface "Garamond" 
twoway ///
	(rarea linear_lb linear_ub aqi , sort color(gs14) ) ///
	(connected linear_b aqi , lpattern(dash) lcolor(gray) mcolor(blue) msymbol(o)) ///
	(connected nonlinear_b aqi , lpattern(solid) lcolor(gray) mcolor(red) msymbol(s)) ///
	(rcap nonlinear_lb nonlinear_ub aqi , ) ///
	, ///
	ylabel(, nogrid angle(horizontal)  ) ///
	scheme(s2mono)  ///
	aspectratio(`inv_golden_ratio') ///
	graphregion(fcolor(white))  ///
	xscale( range(74 226) ) ///
	xlabel( 75(50)225 ) ///
	legend(off) ///
	yscale( nofextend ) xscale(nofextend) ///
	xtitle(" ") ///
	ytitle(" ")
graph save ../gph/linear-non-linear-figure.gph , replace




log close
exit
